//
//  NetWorkCollectionCellCollectionViewCell.swift
//  test-ios
//
//  Created by wyz5204 on 2023/3/3.
//

import UIKit
import SwiftUI
import RxSwift

class NetWorkCollectionCell: AbstractCollectionViewCell<String> {
    
    
    private lazy var label : UIButton = {
        return UIButton().then { button in
            button.setTitleColor(UIColor.black, for: .normal)
            button.backgroundColor = .green
            button.isUserInteractionEnabled = false
        }
    }()
    
    override func initView() {
        label.addTo(self.contentView) { view in
            view.snp.makeConstraints { make in
                make.edges.equalToSuperview()
            }
//            label.addTarget(self, action: #selector(btClick(send:)), for: .touchUpInside)
        }
    }
    
    
    @objc private func btClick(send:UIButton){
        print("onclick --> \(send)")
    }
    
    override func initBinder(_ view: UICollectionView, _ data: String, _ index: IndexPath) {
        label.setTitle(data, for: UIControl.State.normal)
    }
    
}
